package com.supermarket.manage.common.dto.member.request;

import com.supermarket.manage.common.validation.CheckGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author Faxon
 * @version 1.0
 * @date 2020-03-12 21:50
 **/
@Data
@ApiModel("MemberPageParams:会员分页、条件查询数据对象")
public class MemberPageParams implements Serializable {

    private static final long serialVersionUID = -6617368495597024810L;
    /**
     * 页码
     */
    @ApiModelProperty(value = "页码")
    @NotNull(message = "页码不能为空", groups = {CheckGroup.Page.class})
    private Integer page;

    /**
     * 每页条目数
     */
    @ApiModelProperty(value = "每页条目数")
    @NotNull(message = "每页条目数不能为空", groups = {CheckGroup.Page.class})
    private Integer size;

    /**
     * 客户id
     */
    @ApiModelProperty(value = "客户id")
    @NotBlank(message = "客户id不能为空", groups = {CheckGroup.Page.class, CheckGroup.Get.class})
    private String buyerId;

    /**
     * 会员手机号
     */
    @ApiModelProperty(value = "会员手机号")
    private String mphone;

    /**
     * 最小积分
     */
    @ApiModelProperty(value = "最小积分")
    private BigDecimal minIntegral;

    /**
     * 最大积分
     */
    @ApiModelProperty(value = "最大积分")
    private BigDecimal maxIntegral;
}
